package com.foreknow.elmboot.controller;

import com.foreknow.elmboot.po.User;
import com.foreknow.elmboot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("UserController")
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("getUserByIdByPass")
    public Object getUserByIdByPass(String userId, String password){
        User user=userService.getUserByIdByPass(userId,password);
        return user;
    }
    @RequestMapping("saveUser")
    public Object saveUser(User user){
        int result=userService.saveUser(user);
        return result;
    }

}
